package gemini.pollux.ui.client.mvp.container;

import ch.elca.gwt.mvp.client.Display;
import ch.elca.gwt.mvp.client.place.Place;
import ch.elca.gwt.mvp.client.widget.WidgetPresenter;

public class PolluxPlaceContainer<P extends WidgetPresenter<? extends Display>>
		extends Place {
	public static interface PresenterGetter<Pt extends WidgetPresenter<? extends Display>> {
		Pt getPresenter();
	}

	private PresenterGetter<P> presenterGetter;

	public PolluxPlaceContainer(final String placeId,
			final PresenterGetter<P> presenterGetter) {
		super(placeId);
		this.presenterGetter = presenterGetter;
	}

	public P getPresenter() {
		return presenterGetter.getPresenter();
	}
}
